The invention relates generally to accessories for electronic devices and in particular to a system for prevention of texting while driving. Worldwide, thousands of drivers and passengers lose their lives every year due to the unfortunate practice of texting while driving. Tens of thousands more are injured every year, with millions of dollars in property damage. Sadly, young drivers are exceptionally vulnerable due to a confluence of factors: their highly elevated reliance on text messaging compared to the rest of the population, coupled with their inexperience behind the wheel. The practice has been banned in most states for good reason, but the changes in the law haven't made much impact on the death toll. An electronic system which effectively prevents drivers from texting while seated in the driver's seat would be well received. Parents may insist on installation of the system before their teenagers are allowed to drive the family car. Large corporations may require installation in every vehicle in their fleet. Traffic court judges may reasonably require proof of installation of the system in defendants' vehicles and personal electronic devices as a condition of sentencing for a broad range of traffic offenses, not limited to texting while driving. Ultimately, state and federal legislatures, traffic safety agencies, and communications regulatory agencies may require that any vehicle or personal electronic device built or sold within their jurisdictions must have components of the system installed. A system for prevention of texting while driving, which blocks the visual display of a smartphone or similar mobile electronic device, would resolve this problem.